home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
doom
/
deep865s.zip
/
SCRIPTS.DOC
< prev
next >
Wrap
Text File
|
1996-03-03
|
18KB
|
451 lines
Understanding The HEXEN Script Code
-----------------------------------
And Making Action Scripts for HEXEN
By : Chris Becker
--------
- NOTE -
--------
This file is intended to be in the ZIP file that contains DeeP.
If you do not have DeeP or or use another editor, some of this
information may not apply.
If you do not have DeeP or use another editor, I greatly recommend
that you use DeeP. It is probably the best DOOM_HERETIC_HEXEN editor
there is. If you do have it and like it, please register!
---------------------
- TABLE OF CONTENTS -
---------------------
I. Introduction
1. What is an Action Script File?
2. What do I have to know?
3. What are the requirements?
II. Understanding the Script Code and some commands
4. The format of an Action Script file (an ACS file)
5. (void) and OPEN
6. LineSpecials
7. Constants
8. Printing Messages
9. DELAY
10. TAGWAIT
11. RANDOM
12. TERMINATE
13. The all-mighty Semi-Colon
III. Conclusion
14. A word to the Un-wise
15. If you need help or want to learn more...
16. Credits
INTRODUCTION
________________
-------------------------------------
- 1. What is an Action Script File? -
-------------------------------------
An Action Script File (ACS) is a set of actions for HEXEN to read.
An ACS file isn't necessary for a HEXEN level. Scripts are used for
any kind of actions you want to happen that you can't do with
just the standard LineDef specials.
For example, in a standard level, you would have a line that opens a
door when you walk over it. This would not require a script, since you
can do this with a standard LineDef type in the editor. But if you
wanted the line to open a door, make an elevator go down, and have
the ceiling come down, this would require a script. One line
cannot do more than one different thing at a time.
------------------------------
- 2. What do I have to know? -
------------------------------
Well you should know how to make a P-Wad fairly well and
understand how that stuff works. If not, then I recommend that you
take some time and learn the basics of level making. (Look in your
DeeP text files for help on that.) If you know that stuff, this
should be easy after you understand it. Other than that, that's all
you should have to know.
- NOTE -
I am also still learning this stuff and some of this stuff may not
be totally the way a pro would do it. But the information in this
document should be sufficient enough to start writing good scripts.
(Note by SBS: And that's why we like it! The perspective of a beginner
limits the discussion to essential elements.)
-------------------
- 3. Requirements -
-------------------
You should have DeeP (The DOOM_HERETIC_HEXEN editor) but if you
don't you need some kind of utilities that will make the script and
put the script into a wad file. And you need the EDIT program
usually found in your DOS directory. This is where you will be
writing the scripts. You should also have HEXEN.
Understanding The HEXEN Script Code
_______________________________________
And Some Commands
-------------------------------
- 4. The format of an ACS File-
-------------------------------
The format of an ACS file is simple. This is one of the easiest
parts of making ACS files. But these parts of an ACS are essential.
The file won't work if the format is not followed.
Here is an example...
_______________________________________________
|
#include "common.acs" |
|
Script 1 (void) |
{ |
-YOUR COMMANDS HERE- |
} |
_______________________________________________|
The "#include "common.acs" line is needed to tell the script
making program to include the file COMMON.ACS file. (The
COMMON.ACS file has a lot of information needed for items and
the different things you can do in HEXEN.)
The "Script 1 (void)" line is self explanitory. This line tells
the script number your working on. The "(void)" part of this line
you will learn about later. If you're just starting, use this as a
default.
The "{" thing is used when you are ready to start putting commands
in the script. The "}" thing means you are ready to stop puting
in commands.
NOTE - If for any reason you need to use more than one of these,
remember to align them on the same line (makes it easier to read)!
Like this...
_______________________________________________
{ |
{ |
-YOUR COMMANDS HERE- |
} |
} |
_______________________________________________|
As you can see all "{" and "}" things are aligned on the same line.
The "-YOUR COMMANDS HERE-" line tells where all your commands go.
----------------------
- 5. (void) and OPEN -
----------------------
"(void)" and "OPEN" are simple. "(void)" means that there are no
variables passed to the script. (You will learn about variables later
in this document.) For many scripts you use "(void)".
You use "OPEN" when you want the script to run as soon as the
game starts. Use this when you want to activate something in the
beginning of the level. Examples are printing a message, playing
a sound track, lowering a floor, you know, all the fun stuff!
-Look at the examples below...
______________________________________________
|
Script 1 (void) | There are no Variables
{ | passed to this script.
-YOUR COMMANDS HERE- |
} | Use when starting out!
______________________________________________|
and
______________________________________________
|
Script 1 OPEN | This script prints
{ | "Hi. I rule"
print(s:"Hi. I rule"); | when the game starts.
} |
______________________________________________|
--------------------
- 6. Line Specials -
--------------------
Line Specials are the meat of the script. These are the parts that
tell what's going to happen. Like let's say you wanted a floor to
rise up after a line had been crossed. This is what it would
look like...
______________________________________________
Script 1 (void) |
{ | This is telling HEXEN that
Floor_RaiseByValue(CONSTANTS); | you want a floor to rise
} | by a certain value.
| The (CONSTANTS) part is
| covered next.
____________________________________________